Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spiral-matrix: add to track #677

Merged
merged 1 commit into from
Jul 4, 2017
Merged

spiral-matrix: add to track #677

merged 1 commit into from
Jul 4, 2017

Conversation

stkent
Copy link
Contributor

@stkent stkent commented Jul 3, 2017

@@ -285,6 +285,13 @@
]
},
{
"slug": "spiral-matrix",
"difficulty": 6,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best guess.




}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check: is this needed per policy?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, according to the policy after the first 20 exercises no starter implementation needs to be provided. But quite a few exercises after the first 20 have an empty starter implementation like this. Do you think that's okay or should we make them more consistent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's an open issue for cleanup; let's decide there whether we want no implementation or empty class(es)! #554

@stkent stkent changed the title spiral-matrix: dibs on adding to track spiral-matrix: add to track Jul 3, 2017
Copy link
Contributor

@FridaTveit FridaTveit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I have a few comments, but they're all really minor so happy to merge as is :)

class SpiralMatrixBuilder {

int[][] ofSize(int size) {
if (size == 0) return new int[][]{};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add curly brackets and put the if body on a new line, just to be safe :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kotlin habits sneaking in ;)




}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, according to the policy after the first 20 exercises no starter implementation needs to be provided. But quite a few exercises after the first 20 have an empty starter implementation like this. Do you think that's okay or should we make them more consistent?

@@ -0,0 +1,27 @@
class SpiralMatrixBuilder {

int[][] ofSize(int size) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe buildMatrixOfSize() would be a more descriptive name?

@FridaTveit FridaTveit self-assigned this Jul 3, 2017
Copy link
Contributor

@FridaTveit FridaTveit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks @stkent! :)

@FridaTveit FridaTveit merged commit 0c24d30 into master Jul 4, 2017
@stkent stkent deleted the spiral-matrix branch July 4, 2017 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants